package j17;

public class J17_Product implements J17_ProductService {

	private J17_ProductVO[] pdate = new J17_ProductVO[100];
	
	private int pos = -1;		//1번
	
	@Override
	public boolean addProduct(J17_ProductVO p) {
		pdate[++pos] = p;		//2번
		return true;
	}

	@Override
	public String readProduct() {
		String result = "";
		J17_ProductVO pvo;
		for(int i = 0; i <= pos; ++i) {
			pvo = pdate[i];
			result += pvo.toString()+ "\n";
		}
		return result;			//3번
	}

}
